import React, { Component } from 'react';
import dynamic from 'dva/dynamic';
import { Route } from 'dva/router';

export default function cartRoute(app) {

  const Cart = dynamic({
    app,
    models: () => {
      return [
        import(/* webpackChunkName: "cartModel" */'../models/cart/cartModel'),
        import(/* webpackChunkName: "cartModel" */'../models/order/orderModel'),
      ];
    },
    component: () => import(/* webpackChunkName: "cart" */'../routes/cart/cart'),
  });



  return (
    [
      <Route key="/cart" exact path="/cart" component={Cart}/>
    ]
  );
}
